package com.guangyunl.d_if;

import java.util.Random;

public class Demo04IfElse {
    public static void main(String[] args) {
        // 创建对象
        Random rd = new Random();
        // 获取两个数
        int data1 = rd.nextInt();
        int data2 = rd.nextInt();

        System.out.println("data1 = " + data1);
        System.out.println("data2 = " + data2);
        if (data1 > data2){
            System.out.println("两个数的较大值为data1: " + data1);
        }else{
            System.out.println("两个数的较大值为data2: " + data2);
        }
    }
}
